package com.fortune.dto.in.cOrderMgt;

import com.fortune.constants.enums.DetailType;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

public class COrderProduceDto {
    @NotBlank(message="商品ID不能为空")
    @ApiModelProperty(required=true, example="商品ID")
    private String id;
//    @NotBlank(message="序号不能为空")
//    @ApiModelProperty(required=true, example="序号")
//    private String no;
    @NotBlank(message="分类不能为空")
    @ApiModelProperty(required=true, example="分类(XS销售,ZS赠送)")
    private DetailType type;
    @NotNull(message="单价不能为空")
    @ApiModelProperty(required=true, example="单价")
    private BigDecimal unitPrice;
    @Min(value = 0,message = "最小为0")
    @ApiModelProperty(required=true, example="订货数量")
    private int orderNum;
    @NotNull(message="商品金额不能为空")
    @ApiModelProperty(required=true, example="商品金额")
    private BigDecimal price;
    @Min(value = 0,message = "最小为0")
    @ApiModelProperty(required=true, example="回空箱数量")
    private int backBoxNum;
    @Min(value = 0,message = "最小为0")
    @ApiModelProperty(required=true, example="押金金额")
    private BigDecimal dprice;
    @Min(value = 0,message = "最小为0")
    @ApiModelProperty(required=true, example="金额小计")
    private BigDecimal tprice;
    @NotBlank(message="备注不能为空")
    @ApiModelProperty(required=true, example="备注")
    private String memo;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public DetailType getType() {
        return type;
    }

    public void setType(DetailType type) {
        this.type = type;
    }

    public BigDecimal getUnitPrice() {
        return unitPrice;
    }

    public void setUnitPrice(BigDecimal unitPrice) {
        this.unitPrice = unitPrice;
    }

    public int getOrderNum() {
        return orderNum;
    }

    public void setOrderNum(int orderNum) {
        this.orderNum = orderNum;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public int getBackBoxNum() {
        return backBoxNum;
    }

    public void setBackBoxNum(int backBoxNum) {
        this.backBoxNum = backBoxNum;
    }

    public BigDecimal getDprice() {
        return dprice;
    }

    public void setDprice(BigDecimal dprice) {
        this.dprice = dprice;
    }

    public BigDecimal getTprice() {
        return tprice;
    }

    public void setTprice(BigDecimal tprice) {
        this.tprice = tprice;
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    @Override
    public String toString() {
        return "COrderProduceDto{" +
                "id='" + id + '\'' +
                ", type=" + type +
                ", unitPrice=" + unitPrice +
                ", orderNum=" + orderNum +
                ", price=" + price +
                ", backBoxNum=" + backBoxNum +
                ", dprice=" + dprice +
                ", tprice=" + tprice +
                ", memo='" + memo + '\'' +
                '}';
    }
}
